/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financial.entity.taxclearance;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 通关缴税Entity
 * @author Kilo
 * @version 2021-03-10
 */
@Table(name="t_tax_clearance_detail", alias="a", columns={
		@Column(name="tax_clearance_detail_id", attrName="taxClearanceDetailId", label="通关缴税明细ID", isPK=true),
		@Column(name="start_days", attrName="startDays", label="开始天数"),
		@Column(name="end_days", attrName="endDays", label="结束天数"),
		@Column(name="start_date", attrName="startDate", label="开始日期"),
		@Column(name="end_date", attrName="endDate", label="结束日期"),
		@Column(name="margin_amount", attrName="marginAmount", label="保证金金额"),
		@Column(name="interest_rate", attrName="interestRate", label="利率"),
		@Column(name="interest", attrName="interest", label="利息"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="type", attrName="type", label="类型", comment="类型（1资方 2客户）"),
		@Column(name="tax_clearance_id", attrName="taxClearanceId.taxClearanceId", label="通关缴税ID"),
		@Column(name="prepayment_id", attrName="prepaymentId", label="预付款ID"),
		@Column(name="advances_received_id", attrName="advancesReceivedId", label="预收款ID"),
	}, orderBy="a.tax_clearance_detail_id ASC"
)
public class TaxClearanceDetail extends DataEntity<TaxClearanceDetail> {
	
	private static final long serialVersionUID = 1L;
	private String taxClearanceDetailId;		// 通关缴税明细ID
	private Long startDays;		// 开始天数
	private Long endDays;		// 结束天数
	private Date startDate;		// 开始日期
	private Date endDate;		// 结束日期
	private Double marginAmount;		// 保证金金额
	private String interestRate;		// 利率
	private Double interest;		// 利息
	private String remark;		// 备注
	private String type;		// 类型（1资方 2客户）
	private TaxClearance taxClearanceId;		// 通关缴税ID 父类
	private Double marginRatio;		// 保证金比例
	private String prepaymentId;
	private String advancesReceivedId;

	public String getPrepaymentId() {
		return prepaymentId;
	}

	public void setPrepaymentId(String prepaymentId) {
		this.prepaymentId = prepaymentId;
	}

	public String getAdvancesReceivedId() {
		return advancesReceivedId;
	}

	public void setAdvancesReceivedId(String advancesReceivedId) {
		this.advancesReceivedId = advancesReceivedId;
	}

	public Double getMarginRatio() {
		return marginRatio;
	}

	public void setMarginRatio(Double marginRatio) {
		this.marginRatio = marginRatio;
	}

	public TaxClearanceDetail() {
		this(null);
	}


	public TaxClearanceDetail(TaxClearance taxClearanceId){
		this.taxClearanceId = taxClearanceId;
	}
	
	public String getTaxClearanceDetailId() {
		return taxClearanceDetailId;
	}

	public void setTaxClearanceDetailId(String taxClearanceDetailId) {
		this.taxClearanceDetailId = taxClearanceDetailId;
	}
	
	public Long getStartDays() {
		return startDays;
	}

	public void setStartDays(Long startDays) {
		this.startDays = startDays;
	}
	
	public Long getEndDays() {
		return endDays;
	}

	public void setEndDays(Long endDays) {
		this.endDays = endDays;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	public Double getMarginAmount() {
		return marginAmount;
	}

	public void setMarginAmount(Double marginAmount) {
		this.marginAmount = marginAmount;
	}
	
	@Length(min=0, max=10, message="利率长度不能超过 10 个字符")
	public String getInterestRate() {
		return interestRate;
	}

	public void setInterestRate(String interestRate) {
		this.interestRate = interestRate;
	}
	
	public Double getInterest() {
		return interest;
	}

	public void setInterest(Double interest) {
		this.interest = interest;
	}
	
	@Length(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public TaxClearance getTaxClearanceId() {
		return taxClearanceId;
	}

	public void setTaxClearanceId(TaxClearance taxClearanceId) {
		this.taxClearanceId = taxClearanceId;
	}
	
}